package threaddemo2;

/**
 * Created by L.jp
 * Description:
 * User: 86189
 * Date: 2022-08-06
 * Time: 17:49
 */
//实现线程的第二种方式就是实现Runnable接口，然后把类的实例作为参数传递给Thread类
public class MyRunnable implements  Runnable{
    
    @Override
    public void run() {
        for(int i=0;i<100;i++){
            System.out.println(Thread.currentThread().getName()+"第二种方式启动线程"+i);
        }
    }
}
